package com.g8.pethospitallearnbackend.entity;

import java.io.Serializable;

public class Medicine implements Serializable {
    private String medicineId;

    private String medicineName;

    private Double medicinePrice;

    private String medicineDesc;

    private String medicineMeasure;

    private String medicineWarning;

    private static final long serialVersionUID = 1L;

    public String getMedicineId() {
        return medicineId;
    }

    public void setMedicineId(String medicineId) {
        this.medicineId = medicineId;
    }

    public String getMedicineName() {
        return medicineName;
    }

    public void setMedicineName(String medicineName) {
        this.medicineName = medicineName;
    }

    public Double getMedicinePrice() {
        return medicinePrice;
    }

    public void setMedicinePrice(Double medicinePrice) {
        this.medicinePrice = medicinePrice;
    }

    public String getMedicineDesc() {
        return medicineDesc;
    }

    public void setMedicineDesc(String medicineDesc) {
        this.medicineDesc = medicineDesc;
    }

    public String getMedicineMeasure() {
        return medicineMeasure;
    }

    public void setMedicineMeasure(String medicineMeasure) {
        this.medicineMeasure = medicineMeasure;
    }

    public String getMedicineWarning() {
        return medicineWarning;
    }

    public void setMedicineWarning(String medicineWarning) {
        this.medicineWarning = medicineWarning;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", medicineId=").append(medicineId);
        sb.append(", medicineName=").append(medicineName);
        sb.append(", medicinePrice=").append(medicinePrice);
        sb.append(", medicineDesc=").append(medicineDesc);
        sb.append(", medicineMeasure=").append(medicineMeasure);
        sb.append(", medicineWarning=").append(medicineWarning);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Medicine other = (Medicine) that;
        return (this.getMedicineId() == null ? other.getMedicineId() == null : this.getMedicineId().equals(other.getMedicineId()))
            && (this.getMedicineName() == null ? other.getMedicineName() == null : this.getMedicineName().equals(other.getMedicineName()))
            && (this.getMedicinePrice() == null ? other.getMedicinePrice() == null : this.getMedicinePrice().equals(other.getMedicinePrice()))
            && (this.getMedicineDesc() == null ? other.getMedicineDesc() == null : this.getMedicineDesc().equals(other.getMedicineDesc()))
            && (this.getMedicineMeasure() == null ? other.getMedicineMeasure() == null : this.getMedicineMeasure().equals(other.getMedicineMeasure()))
            && (this.getMedicineWarning() == null ? other.getMedicineWarning() == null : this.getMedicineWarning().equals(other.getMedicineWarning()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMedicineId() == null) ? 0 : getMedicineId().hashCode());
        result = prime * result + ((getMedicineName() == null) ? 0 : getMedicineName().hashCode());
        result = prime * result + ((getMedicinePrice() == null) ? 0 : getMedicinePrice().hashCode());
        result = prime * result + ((getMedicineDesc() == null) ? 0 : getMedicineDesc().hashCode());
        result = prime * result + ((getMedicineMeasure() == null) ? 0 : getMedicineMeasure().hashCode());
        result = prime * result + ((getMedicineWarning() == null) ? 0 : getMedicineWarning().hashCode());
        return result;
    }
}